package com.yanmaohu.yulia.bean;

import java.util.List;

/**
 * @author Bright Lee
 */
public final class SortSpecificationList {

    private int beginIndex;
    private int endIndex;
    private List<SortSpecification> sortSpecificationList;

    public SortSpecificationList(List<SortSpecification> sortSpecificationList) {
        this.beginIndex = sortSpecificationList.get(0).getBeginIndex();
        this.endIndex = sortSpecificationList.get(sortSpecificationList.size() - 1).getEndIndex();
        this.sortSpecificationList = sortSpecificationList;
    }

    public int getBeginIndex() {
        return beginIndex;
    }

    public int getEndIndex() {
        return endIndex;
    }

    public int size() {
        return sortSpecificationList.size();
    }

    public SortSpecification get(int index) {
        return sortSpecificationList.get(index);
    }

}
